package org.whuims.index;

import org.apache.solr.client.solrj.SolrServerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.whuims.repository.jpa.StandardDao;
import org.whuims.repository.solr.SolrStandardDao;

import java.io.IOException;

/**
 * Created by zhongwei on 16/12/21.
 */
@Component
public class Indexer {

    @Autowired
    private SolrStandardDao solrStandardDao;
    @Autowired
    private StandardDao standardDao;
    private Logger logger = LoggerFactory.getLogger(Indexer.class);

    public void index() throws IOException, SolrServerException {
//        Iterable<Standard> standards = standardDao.findAll();
//        solrStandardDao.save(standards);
//        logger.info("Update(Create) index done!");
    }
}
